<template>
	<view>
		<titlebar :back="true" :text="text" />
		<image class="img1" mode="widthFix" :src="url"></image>
		<image class="img2" mode="widthFix" src="https://pfmotortest.hb4oss.xstore.ctyun.cn/appstatic/car/done.png">
		</image>
		<view class="text1">预约成功</view>
		<view class="text2">请保持预约手机号畅通</view>
		<view class="text2">会有工作人员与您联系</view>
		<view class="btn" @click="toAppointmentPage">完成</view>
	</view>
</template>

<script>
	const app = getApp();
	const network = require("@manager/network-manager.js");
	import Validator from '@manager/validator.js'
	export default {
		data() {
			return {
				text: '预约试驾',
				url: null,
				model:''
				
			}
		},
		created() {},
		onReady() {},
		onShow() {},
		onLoad(options) {
			console.log('options', options)
			this.url = options.url
			if(options.from&&options.from=='维修保养'){
				if(options.type=='1'){
					this.text='维修预约'
					this.model ='repair' 
				}else{
					this.text='保养预约'
					this.model ='maintain' 
				}
				
			}
		},
		methods: {
			toAppointmentPage() {
				
				if(this.text=='预约试驾'){
					uni.redirectTo({
						url: "/module_my/pages/myAppointment/myAppointment",
					});
				}
				
				if(this.text=='保养预约'||this.text=='维修预约'){
					uni.redirectTo({
						url: "/module_my/pages/myMaintainList/myMaintainList?model="+this.model,
					});
				}
				
				
			},
		}
	}
</script>

<style scoped>
	page {
		/* background: #E5E5E5; */
	}

	.img1 {
		width: 100%;
	}

	.img2 {
		width: 30px;
		height: 30px;
		position: relative;
		left: calc(50% - 15px);
	}

	.text1 {
		text-align: center;
		font-size: 16px;
		line-height: 22px;
		color: #3D3A3A;
		margin: 12px 0 8px;
	}

	.text2 {
		text-align: center;
		font-size: 14px;
		line-height: 20px;
		color: #ADB0AE;
	}

	.btn {
		position: absolute;
		width: calc(100% - 40px);
		bottom: 34px;
		left: 20px;
		font-size: 16px;
		line-height: 42px;
		color: #EA5404;
		text-align: center;
		border: 1px solid #EA5404;
		border-radius: 2px;
	}
</style>
